package jianzhiOffer;

import java.util.Arrays;
//剑指 Offer 39. 数组中出现次数超过一半的数字

public class Num39_majorityElement {
    public int majorityElement(int[] nums) {
        Arrays.sort(nums);
        return nums[nums.length/2];


    }
}
